package com.carleasoft.mps.cms.business.train.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.carleasoft.mps.cms.business.train.bean.entity.TrainScore;
import com.carleasoft.mps.cms.business.train.bean.po.QueryTrainScoreByUserCodePo;
import com.carleasoft.mps.cms.business.train.bean.po.RegisterPageQuery;
import com.carleasoft.mps.cms.business.train.bean.vo.TrainScoreDetailVo;
import com.carleasoft.mps.cms.business.train.bean.vo.TrainScoreVo;
import com.carleasoft.mps.cms.business.train.bean.vo.UserAndDeptMsgVo;
import com.carleasoft.mps.core.result.R;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 考核成绩登记表 服务类
 * </p>
 *
 * @author fan
 * @since 2023-05-17
 */
public interface TrainScoreService extends IService<TrainScore> {
    /**
     * 训练考核-成绩登记-分页查询
     */
    Page<TrainScoreVo> registerPageQuery(Page page, RegisterPageQuery registerPageQuery);
    /**
     * 训练考核-成绩登记-详情
     */
    TrainScoreDetailVo registerDetail(String scoreCode);
    /**
     * 根据部门编码集合查询所有的子部门
     */
    List<String> getAllDeptCodesByCodeList( List<String> list);

    List<TrainScore> getScoreByExamCode(String examCode);
    /**
     * 根据部门编码集合获取部门下的人员
     */
    List<UserAndDeptMsgVo> getUserByDeptCodes(List<String> deptCodes);
    /**
     * 批量更新成绩
     */
    boolean batchUpdate(List<TrainScore> trainScoreList);
    /**
     * 根据人员编码获取考核的成绩信息
     */
    Page<HashMap<String,Object>> queryTrainScoreByUserCode( QueryTrainScoreByUserCodePo queryTrainScoreByUserCodePo);
    /**
     * 查询各个评分段的评分数量
     */
    Integer queryScore( List<String> list, String examCode,List<String> rate,Integer type);
    /**
     * 查询各个评分段的评分数量(不合格)
     */
    Integer queryScore1( List<String> list, String examCode,List<String> rate);
}
